package org.stu.action;

import com.opensymphony.xwork2.ActionContext;

import java.util.*;
import org.stu.action.base.*;
import org.stu.dto.*;
/**
 * @author  yeeku.H.lee kongyeeku@163.com
 * @version  1.0
 * <br>Copyright (C), 2005-2008, yeeku.H.Lee
 * <br>This program is protected by copyright laws.
 * <br>Program Name:
 * <br>Date: 
 */

public class RegistAction extends BaseAction
{
	private User user;
	private UserType userType;
	private String type="1";


	@Override
	public String execute() throws Exception
	{	
		userType=mgr.getUserTypeById(Integer.parseInt(type));
		user.setUserType(userType);
		mgr.addUser(user);
        return MAIN;
	}

	public void setUser(User user)
	{
		this.user = user;
	}
	public User getUser()
	{
		 return this.user;
	}
	public String getType() {
		return type;
	}


	public void setType(String type) {
		this.type = type;
	}

}